#{extends 'orgLead.html' /}

#{if relations}
<input type = "hidden" name = "currentId" value = "${dep.id}">
#{list items:relations, as: 'rel'}
<input type = "text" disabled="disabled" value = "${dep.name}">&nbsp;
<input type = "text" disabled="disabled" value = "${rel.relation.relation}">&nbsp;
<input type = "text" disabled="disabled" value = "${rel.department2.name}">&nbsp;&nbsp;&nbsp;&nbsp;
<a href = "@{Application.setRelationBetweenDepartments(dep.id, rel.id)}">Edit</a>&nbsp;&nbsp;
<a href = "@{Application.deleteRelation(rel.id, dep.id)}">Delete</a>&nbsp;&nbsp;<br>
#{/list}
#{/if}
#{else}
No Relations in this Department
#{/else}
